# -*- coding: utf-8 -*-
"""
@Time ： 2023/10/16 23:57
@Auth ： y.h
@File ：reset_col_index_properties.py
@IDE ：PyCharm
@Motto：The sooner you start to code, the longer the program will take. —— Roy Carlson
"""
import pandas


class 指定列索引配置文件:
    __df = None

    __col_index: int = None

    def get_df(self):
        return self.__df

    def 配置数据集(self, df):
        if type(df) != type(pandas.DataFrame()):
            print("数据集类型错误!")
            exit(True)
        else:
            self.__df = df

        return self

    def get_col_index(self):
        return self.__col_index

    def 配置列索引行序号(self, col_index):
        if col_index < 0:
            col_index = 0
        if type(col_index) != type(int()):
            print(f"列索引应为整型,当前类型为{type(col_index)}")
            exit(True)
        else:
            self.__col_index = col_index
        return self
